-- CALC_CHESS_MASTER_BONUS

-- 计算象棋大师尸体的奖励
return function(user, bonusArg)
    local classId;
    local bonus = {};
    local rand = DungeonM.getRandSeed("CHESS_MASTER");
    local items = { 8195, 8196, 8197, 8198, 8199, 8200, };
    local dungeonId = DungeonM.getDungeonId();

    classId = FormulaM.invoke("FETCH_BY_RAND", items, rand);
    table.insert(bonus, {1, classId, 1} );

    if dungeonId == 20013 then
        table.insert(bonus, {1, 7413, 3} );
    elseif dungeonId == 20012 then
        table.insert(bonus, {1, 7413, 4} );
    else
        table.insert(bonus, {1, 7413, 5} );
    end

    return bonus;
end